package com.xuanxing123.dao.hibernate;

import com.xuanxing123.dao.IndustryDao;
import com.xuanxing123.model.Industry;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("industryDao")
public class IndustryDaoHibernate extends GenericDaoHibernate<Industry, Long> implements IndustryDao {

    public IndustryDaoHibernate() {
        super(Industry.class);
    }

    /**
     * {@inheritDoc}
    */
    @SuppressWarnings("unchecked")
    public List<Industry> getAll() {
        return getHibernateTemplate().find("from Industry order by position");
    }
}
